﻿using System.Collections.Generic;
using ProtoBuf;
namespace PnJ.Aliyun.OTS.Models
{
    /// <summary>
    /// 表的结构信息
    /// </summary>
    [ProtoContract(Name = "TableMeta")]
    public class TableMeta
    {
      
        private List<ColumnSchema> primaryKeys = new List<ColumnSchema>();

        public TableMeta()
        {
            
        }
        public TableMeta(string tableName)
        {
            this.TableName = tableName;
        }
        /// <summary>
        /// 该表的表名
        /// </summary>
        [ProtoMember(1, Name = "table_name", IsRequired = true)]
        public string TableName
        {
            get; set;
        }
        /// <summary>
        /// 该表全部的主键列
        /// </summary>
        [ProtoMember(2, Name = "primary_key")]
        public List<ColumnSchema> PrimaryKeys
        {
            get { return primaryKeys; }
            set { primaryKeys = value; }
        }

    }
}
